﻿ //日历控件
$(function () {
    $("#date-val").val(function () {
        var current_date = new Date();
        return current_date.getFullYear() + "-" + (current_date.getMonth() + 1) + "-" + current_date.getDate();
    });
    var cc_ishide = true;
    $('#date-picker').calendar({
        months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
        weeks: ["日", "一", "二", "三", "四", "五", "六"],
        onSelect: function (date) {
            var select_date = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
            $("#date-val").val(select_date);
            $("#date-picker").hide();
            cc_ishide = true;
        }
    });
    $("#date-picker-icon").click(function (e) {
        $('#date-picker').css("left", e.pageX - 120);
        cc_ishide ? $('#date-picker').slideDown("fast") : $('#date-picker').slideUp("fast");
        cc_ishide = !cc_ishide;
    });
});

//lodop 打印控件
var LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
function lodopPrint() {
    LODOP.preview();
}